# 自己构建的基于centos6.7 + jdk1.8的镜像
FROM ctcloud/centos:6.7

# 复制整个assembly发布目录到容器
copy / /root/ctcloud-server-admin

# 暴露镜像的端口供主机做映射
EXPOSE 9002

# 需要执行的命令
RUN chmod +x /root/ctcloud-server-admin/bin/*.sh

ENTRYPOINT /root/ctcloud-server-admin/bin/start.sh && tail -F /root/ctcloud-server-admin/nohup.out

####################################################
# 启动容器(maven构建后，要等一段时间再启动容器，否则启动会失败)
# docker run -id --name server-admin -p 9002:9002 192.168.66.41:7080/ctcloud/ctcloud-server-admin:1.0.0
# docker run --log-driver=fluentd --log-opt fluentd-address=192.168.66.41:24224 --log-opt tag=httpd.access -id --name server-admin -p 9002:9002 192.168.66.41:7080/ctcloud/ctcloud-server-admin:1.0.0
# 查看容器状态
# docker ps -a
# 进入容器
# docker exec -it server-admin /bin/bash

